var express = require('express');
var router = express.Router();

//连接数据库
require('../db')

const checkSignature = require('../controller/checkSignature')
const menuController = require('../controller/menu')
const switchController = require("../controller/switcher")

//验证消息来源与微信服务器
router.get('/', checkSignature);

//消息处理
router.post('/', switchController)

// 菜单管理
router.get('/menu', menuController.createMenu)

module.exports = router;
